package org.brisling.base.domain.impl;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.MappedSuperclass;
import javax.persistence.Transient;

import org.brisling.common.util.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * 
 * <p>Title: BaseDomainExcludeId</p>
 * <p>Description: 未配置id自动生成的业务实体类基类</p>
 * <p>Company: tongking</p> 
 * @author jackson wang
 * @since  1.0
 * @version 1.0
 * @date 2015年6月11日 下午10:47:13
 */
@MappedSuperclass
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler"})
public class BaseDomainExcludeId {
	
	
	
	//临时id，用于新增保存前的id值，一遍附件上传等业务在新增前可以操作
	@Transient	
	private String tmpid;
	
	//多条记录id保存字段
	@Transient	
	private String ids;
	/*
	 * 业务编号
	 */
	@Column
	protected Long bizid;
	
	/*
	 * 业务编码
	 */
	@Column
	protected String bizno;	
	
	/*
	 * 业务唯一标识
	 */
	@Column
	protected String identify;
	
	/*
	 * 名称
	 */
	@Column
	protected String name;
	
	/*
	 * 排序号
	 */
	@Column
	protected Integer sortedid;
	
	@Transient
	protected String jsonData;
	
	/*
	 * 创建时间
	 */
	@Column
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	protected Date createTime;
	
	/*
	 * 更新时间
	 */
	@Column
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	protected Date modiDate;
	
	/*
	 * 创建人
	 */
	@Column
	protected Long creater;
	
	/*
	 * 更新人
	 */
	@Column
	protected Long modifier;
	
	/*
	 * 业务编码
	 */	
	@Column
	protected String bizcode;
	
	
	
	


	/* (non-Javadoc)
	 * @see org.brisling.domain.common.BaseDomainInf#getModiDate()
	 */
	
	
	

	public Date getModiDate() {
		return modiDate;
	}

	
	/* (non-Javadoc)
	 * @see org.brisling.domain.common.BaseDomainInf#setModiDate(java.util.Date)
	 */
	
	
	public void setModiDate(Date modiDate) {
		this.modiDate = modiDate;
	}

	/* (non-Javadoc)
	 * @see org.brisling.domain.common.BaseDomainInf#getCreater()
	 */
	
	
	
	public Long getCreater() {
		return creater;
	}

	
	/* (non-Javadoc)
	 * @see org.brisling.domain.common.BaseDomainInf#setCreater(java.lang.Long)
	 */
	
	
	public void setCreater(Long creater) {
		this.creater = creater;
	}

	/* (non-Javadoc)
	 * @see org.brisling.domain.common.BaseDomainInf#getModifier()
	 */
	
	
	
	public Long getModifier() {
		return modifier;
	}

	
	/* (non-Javadoc)
	 * @see org.brisling.domain.common.BaseDomainInf#setModifier(java.lang.Long)
	 */
	
	
	public void setModifier(Long modifier) {
		this.modifier = modifier;
	}

	@Column
	protected String remarks;

	
	
	
	
	

	/* (non-Javadoc)
	 * @see org.brisling.domain.common.BaseDomainInf#getBizid()
	 */

	
	public Long getBizid() {
		return bizid;
	}
	
	

	/* (non-Javadoc)
	 * @see org.brisling.domain.common.BaseDomainInf#setBizid(java.lang.Long)
	 */
	
	
	public void setBizid(Long bizcode) {
		this.bizid = bizcode;
	}

	/* (non-Javadoc)
	 * @see org.brisling.domain.common.BaseDomainInf#getIdentify()
	 */
	
	
	public String getIdentify() {
		return identify;
	}

	/* (non-Javadoc)
	 * @see org.brisling.domain.common.BaseDomainInf#setIdentify(java.lang.String)
	 */
	
	
	public void setIdentify(String identify) {
		this.identify = identify;
	}

	/* (non-Javadoc)
	 * @see org.brisling.domain.common.BaseDomainInf#getName()
	 */
	
	
	public String getName() {
		return name;
	}

	/* (non-Javadoc)
	 * @see org.brisling.domain.common.BaseDomainInf#setName(java.lang.String)
	 */
	
	
	public void setName(String name) {
		this.name = name;
	}

	/* (non-Javadoc)
	 * @see org.brisling.domain.common.BaseDomainInf#getSortedid()
	 */
	
	
	public Integer getSortedid() {
		return sortedid;
	}

	/* (non-Javadoc)
	 * @see org.brisling.domain.common.BaseDomainInf#setSortedid(java.lang.Integer)
	 */
	
	
	public void setSortedid(Integer sortedid) {
		this.sortedid = sortedid;
	}

	/* (non-Javadoc)
	 * @see org.brisling.domain.common.BaseDomainInf#getCreateTime()
	 */
	
	
	public Date getCreateTime() {
		return createTime;
	}

	/* (non-Javadoc)
	 * @see org.brisling.domain.common.BaseDomainInf#setCreateTime(java.util.Date)
	 */
	
	
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	/* (non-Javadoc)
	 * @see org.brisling.domain.common.BaseDomainInf#getComment()
	 */
	
	
	public String getRemarks() {
		return remarks;
	}

	/* (non-Javadoc)
	 * @see org.brisling.domain.common.BaseDomainInf#setComment(java.lang.String)
	 */
	
	
	public void setRemarks(String comment) {
		this.remarks = comment;
	}	
	
	/* (non-Javadoc)
	 * @see org.brisling.domain.common.BaseDomainInf#getCreateTimeJson()
	 */
	
	
	public String getCreateTimeJson(){
		
		return DateUtil.date2JsonStr(createTime);
	}
	
	/* (non-Javadoc)
	 * @see org.brisling.domain.common.BaseDomainInf#setCreateTimeJson(java.lang.String)
	 */
	
	
	public void setCreateTimeJson(String date){
		
		this.setCreateTime(DateUtil.jsonStr2Date(date));
	}


	public String getBizno() {
		return bizno;
	}


	public void setBizno(String bizno) {
		this.bizno = bizno;
	}
	
	
	public String getBizcode() {
		// TODO Auto-generated method stub
		return this.bizcode;
	}

	
	public void setBizcode(String bizcode) {
		// TODO Auto-generated method stub
		this.bizcode = bizcode;
	}


	public String getTmpid() {
		return tmpid;
	}


	public void setTmpid(String tmpid) {
		this.tmpid = tmpid;
	}


	public String getIds() {
		return ids;
	}


	public void setIds(String ids) {
		this.ids = ids;
	}


	public String getJsonData() {
		return jsonData;
	}


	public void setJsonData(String jsonData) {
		this.jsonData = jsonData;
	}

	
}
